UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2/fMaDvL016i+2TCHBbBFvx+LfYsxZpsbrY6ItnCd4s='
WHERE
key_id = '80d82c5cc358b10543fe5b658ed4c2cb0c8272b203fe89ff46a53c15ab2f370a'
AND (
token = '2/fMaDvL016i+2TCHBbBFvx+LfYsxZpsbrY6ItnCd4s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)