UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5eomSPmiHOcWpKFjSEzBmg4qtj+FNkFlaSDTbmL3U7E='
WHERE
key_id = '334d6425b5a140cbd7b832396b4e03d6dc969b71b5d5b7b592c5840814559502'
AND (
token = '5eomSPmiHOcWpKFjSEzBmg4qtj+FNkFlaSDTbmL3U7E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)