UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Wq3Pmr26LJ0nCP/a085J0cGmgDtgPKWuqwfmnh78N4E='
WHERE
key_id = '2140a9ed5a6e8c203c9d02bd4d8ab5e07f62aec7b2af14e695abbdac4696e269'
AND (
token = 'Wq3Pmr26LJ0nCP/a085J0cGmgDtgPKWuqwfmnh78N4E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)