UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hwLwbTnxBZWnC+0ZVrOqxbqtZEGeY3zyY+ZkxrtT07g='
WHERE
key_id = '56f46b030d2085bff5ae390ea401e52d6c381f49e43413790ff7c3d2e4d0f3bf'
AND (
token = 'hwLwbTnxBZWnC+0ZVrOqxbqtZEGeY3zyY+ZkxrtT07g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)