UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0myGn3/Gtm+/2TR/R1OUHWB62nShxqz1FyUQstx0P8c='
WHERE
key_id = '2c1328885b1f59ef1bc8801e96286c5b48411f98b65f90913f48873b129fda68'
AND (
token = '0myGn3/Gtm+/2TR/R1OUHWB62nShxqz1FyUQstx0P8c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)