UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eaUcrfa+kVZCEY0mMAdfPIhrQqo0Q7J1lk9yQS/AAn0='
WHERE
key_id = '19279140a9f61500565f6dba4b153eafc965ee9fa65c05164d760e08c36fac5c'
AND (
token = 'eaUcrfa+kVZCEY0mMAdfPIhrQqo0Q7J1lk9yQS/AAn0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)