UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4tFCmYEH2/LK4rLmhiDa79cpWa+gK22aNfYichMm4Kw=' 
WHERE 
  key_id = 'b79e0b33cca269aa1ca37a00fb3ae7aac1e33226807f1a6494fce08674acb441' 
  AND (
    token = '4tFCmYEH2/LK4rLmhiDa79cpWa+gK22aNfYichMm4Kw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021