UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pea+TxvSdLqTCVLi34TucPrtZROqHRcteh3Kfqz32P0='
WHERE
key_id = '32908fcf1fd96978b9355560a2bd5a3cc99ebc4613256cc037675ea99038425a'
AND (
token = 'pea+TxvSdLqTCVLi34TucPrtZROqHRcteh3Kfqz32P0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)