UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zu2di11BMFw8vA/qodR6tHt+KaeGumTRJ2Y3nFBnKho=' 
WHERE 
  key_id = 'be656a0ba206e3bb02cce3b499b8bfa66115688d891819504c139260d8c0f3b9' 
  AND (
    token = 'zu2di11BMFw8vA/qodR6tHt+KaeGumTRJ2Y3nFBnKho=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028