UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4QEyU3/lS4oWFpCEI+EC3uQ4zecexL5d7fpNFZpnCN0=' 
WHERE 
  key_id = 'b3f6c7cc82fb27334b62a961438e411de2a6e52d83fe1e9af6fdc0d75d878bce' 
  AND (
    token = '4QEyU3/lS4oWFpCEI+EC3uQ4zecexL5d7fpNFZpnCN0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034