UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '30JzU4/N4OmpsJAR/LzHBWCiwYCQx7dJ6SWnPee5um0='
WHERE
key_id = '1e1d190ff0e10d108d0342194aae8902ef025d088c5b670d2c170293dd7ef919'
AND (
token = '30JzU4/N4OmpsJAR/LzHBWCiwYCQx7dJ6SWnPee5um0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)