UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rzlDRCljS0Vm5ZZ9coSAoYiRqeSGdZC4lOzRh69LGfU=' 
WHERE 
  key_id = 'd36da4ed46d0468c63204e34ac9247f7ac46419da4ff735b06ea2f7134a81c82' 
  AND (
    token = 'rzlDRCljS0Vm5ZZ9coSAoYiRqeSGdZC4lOzRh69LGfU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00110