UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '19F1OFe9Ol1EyT3JMUL+qs0jZ57AtWxyqWe+HuvRnW0='
WHERE
key_id = '4d4b92f3d8d88b0a02b2778fbe88a6d65f883fba6c7f66595ac019be632c6a53'
AND (
token = '19F1OFe9Ol1EyT3JMUL+qs0jZ57AtWxyqWe+HuvRnW0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)