UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bkRx4stDzmluVMUT38Biv81XvmusioO8LCcuxN5w3dM='
WHERE
key_id = '56fa0606a772c9b2dec3a23ac2c4ba7758ac33fedf9625f7ba08a1b934705e7e'
AND (
token = 'bkRx4stDzmluVMUT38Biv81XvmusioO8LCcuxN5w3dM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)