UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3+LNV4SstAa4U7+hn/1B8/gTihNESOVn8evyVckxzys='
WHERE
key_id = '26b7372f3ce8f21b99aa357922079a1d39139b8d18c74c1cf74a89d7362923fb'
AND (
token = '3+LNV4SstAa4U7+hn/1B8/gTihNESOVn8evyVckxzys='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)