UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xfbSh0rtxGH7U2SWwEDZCkd8OXPGH2jKmRHX6y6yTTo=' 
WHERE 
  key_id = '7aba162c4ee7eaa72bf1bec8bb29bf556e0ea134befa2d4815376936c283d0f0' 
  AND (
    token = 'xfbSh0rtxGH7U2SWwEDZCkd8OXPGH2jKmRHX6y6yTTo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029