UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FfUOLce/29heiPi3KSUXH1ceDOGTekR2ACV1pF+4bnw='
WHERE
key_id = '6d113c27dd72f8a03437dad0db6deba064f4cdf8fe31aa8c04124fbae36f16f0'
AND (
token = 'FfUOLce/29heiPi3KSUXH1ceDOGTekR2ACV1pF+4bnw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)