UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WbJf22u9LTiTcSfxXW3OPRZTYZsjUJVbAm21ckAEDUQ='
WHERE
key_id = '6c77c742021686bb0692c8c0b7e6eb49226f6f91181512c29f9485e18720cdc6'
AND (
token = 'WbJf22u9LTiTcSfxXW3OPRZTYZsjUJVbAm21ckAEDUQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)