UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3TZFmMQzlOw0/jjI0gwHSo1WvbcNdZaIFyuXorYd4t0=' 
WHERE 
  key_id = '95a69e5928cbc4ed34fa0755df3661496c7852ce2616adf9bc34bcafff74aa48' 
  AND (
    token = '3TZFmMQzlOw0/jjI0gwHSo1WvbcNdZaIFyuXorYd4t0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032