UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9Ez9NCFKNIWHeIUzllP5j7QB2Z6LAQ3sarNXJQ2Ow3o='
WHERE
key_id = 'f4aaf2b51badfc7a012be3432650323a6518ecf90cc1d76cc3c73591e6a5fed3'
AND (
token = '9Ez9NCFKNIWHeIUzllP5j7QB2Z6LAQ3sarNXJQ2Ow3o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)