UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LV+JtIVXdrZ5/hGvFRH0n9CawC1yRiB+9pJgbik8nBY=' 
WHERE 
  key_id = '6baa4da14c227593d5a139475f9c76d17ae352ef05243cc2b22dcc099ecc3803' 
  AND (
    token = 'LV+JtIVXdrZ5/hGvFRH0n9CawC1yRiB+9pJgbik8nBY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028