UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Wn4u6WQ+G3HT3UtHqUCV2VBYtnlyT1cRwIdWK77D92g='
WHERE
key_id = '625b49d454c2745bc5d907d82d6885862c22e7d5e1a0c799d9e437bc68761e6d'
AND (
token = 'Wn4u6WQ+G3HT3UtHqUCV2VBYtnlyT1cRwIdWK77D92g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)