UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's0V0mA+rQJ5IrtxfDMfwbtmLI//C9FbFyYhK9+ZukJQ='
WHERE
key_id = 'd68437643c78795c89bfdef51e6551ae286c1628f546c3c835a3da25960309f9'
AND (
token = 's0V0mA+rQJ5IrtxfDMfwbtmLI//C9FbFyYhK9+ZukJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)