UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VuisQ0QltUw1LyboyRXwP4XPl1HvpVG+mPdHa2Nj1ps='
WHERE
key_id = '15f1545fa2ff5e7bfdce5f0eca14777cb6b1b1e66688b430fb7e482878babe6e'
AND (
token = 'VuisQ0QltUw1LyboyRXwP4XPl1HvpVG+mPdHa2Nj1ps='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)