UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nTC2zeNmWpUv2Q/S9eqK620nsCHnytzUvsPw3IBGBYM=' 
WHERE 
  key_id = '97495b7c001ea8cbe9c8eefeaea2b226a75fb65516ea529c6ac702aadedec1d3' 
  AND (
    token = 'nTC2zeNmWpUv2Q/S9eqK620nsCHnytzUvsPw3IBGBYM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023