UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '97JmhViu1PymzYoGItiipILPNqjX/wlriTIJGCSPeks='
WHERE
key_id = '94d6948833bed407f66ebc8189c274ea66af6d70f321bc238c4389274da42648'
AND (
token = '97JmhViu1PymzYoGItiipILPNqjX/wlriTIJGCSPeks='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)