UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Uhm9nDhwrTFUWodlnJIPnu9fJm+08j3422xu0T/+P0Y='
WHERE
key_id = '70ae3ea23b0c7df8d1dea8cc06414915f3b0890bb6d5ee5c25a6d853748231e6'
AND (
token = 'Uhm9nDhwrTFUWodlnJIPnu9fJm+08j3422xu0T/+P0Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)