UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bzVHClmLu5jcCa4vyHRPy5eW9XiYDASG8lrWIrjz/7M='
WHERE
key_id = '0438befa82193cbd186f344d04053b529e03594bc65848fb177edbbf7e06e101'
AND (
token = 'bzVHClmLu5jcCa4vyHRPy5eW9XiYDASG8lrWIrjz/7M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)