UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zntAeq7CcddpOWMSLOCwFPeqhGoxpxKpBIndY3jgJiU='
WHERE
key_id = '22086cbeb804c31ff8396ff6e4812a88886678be7bdb296f4f64d567aeae883a'
AND (
token = 'zntAeq7CcddpOWMSLOCwFPeqhGoxpxKpBIndY3jgJiU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)