UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pCe4ms90sM3wSUkWwH1lFbTANNA3rdwegO+t5ctgnTI=' 
WHERE 
  key_id = '218dadf46c74f6007ce5cb698431a5ade4f657878132caacc5f59d419c94986b' 
  AND (
    token = 'pCe4ms90sM3wSUkWwH1lFbTANNA3rdwegO+t5ctgnTI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00218