UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'acC6RppFctIOWbjWomnMIUKyYszLJ3VfOgnPi+SUJvw='
WHERE
key_id = '19e118d8677f3e6772a9bad59840f70cd6d96f8ae5fa942ea1efa37c1fbc301d'
AND (
token = 'acC6RppFctIOWbjWomnMIUKyYszLJ3VfOgnPi+SUJvw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)