UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+BAD6UzgcjQyZNpm0Id38XkY3KW//AeSplIbZeXSCaQ='
WHERE
key_id = '96b15fcd8e38170409081fd953bfeea8abb5002530e179016f8b50e39b8aaa8b'
AND (
token = '+BAD6UzgcjQyZNpm0Id38XkY3KW//AeSplIbZeXSCaQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)