UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b63w0wYOH+naFftYlC1XDGDjEnhHevYLPpP5uJA2S/E='
WHERE
key_id = '153f2b5ff2e316ead460c39c4b5f98da6083703ce62feb33c72dd76c8deb0218'
AND (
token = 'b63w0wYOH+naFftYlC1XDGDjEnhHevYLPpP5uJA2S/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)