UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7FHjLAPTnirxqA3sweVFaRs/9XpdGY1FG11t4NwF7qY='
WHERE
key_id = '83c07d5baee1f28c7419ba91e9c9c2c48b0b44adec340e85f14ec7383c706410'
AND (
token = '7FHjLAPTnirxqA3sweVFaRs/9XpdGY1FG11t4NwF7qY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)