UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4axvsU3f9QIqilhrsT38cKd/Z+vhIK9m4jubLpBRkcU='
WHERE
key_id = '633e0f7ec6538523db62e426ec76a43d3f044912a8071493d33c9ed121101b7a'
AND (
token = '4axvsU3f9QIqilhrsT38cKd/Z+vhIK9m4jubLpBRkcU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)