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

Query time 0.00028