UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BxZFg8OAvfrUnsSPe3RIEtybL6PSz+H/BpRqYABl+vo='
WHERE
key_id = 'b0a188d5b16f9177b2f9a80365626a6e7530474dc6b2902e3e8acc4177603704'
AND (
token = 'BxZFg8OAvfrUnsSPe3RIEtybL6PSz+H/BpRqYABl+vo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)