UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vixpq3LLafCtZHyRojokL1n+6D96zaKH/vjIOnpzBQ4=' 
WHERE 
  key_id = '0b55919d06c9d3d7605ac30617c2ef50b87c198f1cd2e370f697717ee08bbd5a' 
  AND (
    token = 'vixpq3LLafCtZHyRojokL1n+6D96zaKH/vjIOnpzBQ4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017