UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3cv+5/4/KWlRLi5J5/Pq9FXXUK9bfwF2VXg1glrVRvE='
WHERE
key_id = '9bf20c7e44cb100de6779c9c9416d86b4f3c81b69a108c50d6bb5421b8d987f9'
AND (
token = '3cv+5/4/KWlRLi5J5/Pq9FXXUK9bfwF2VXg1glrVRvE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)