UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '68WdGi7+S3FcMNqzGfWtzrVr9p5M5SzAHI/Rq1+r5kw='
WHERE
key_id = 'ce124408a592d7523cd019f192aeafca34ca57949998c6e769fdcb9d538d869d'
AND (
token = '68WdGi7+S3FcMNqzGfWtzrVr9p5M5SzAHI/Rq1+r5kw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)