UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l1fSsT/sNbWYZIiezTSoD9l6pzoXWXaZ6mme5YT2N74='
WHERE
key_id = '737f15edc25a8eedab44ef3afc3308b5eacd568bc9ee83a975d47b89c84dea3c'
AND (
token = 'l1fSsT/sNbWYZIiezTSoD9l6pzoXWXaZ6mme5YT2N74='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)