UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6D48bNv0+jCjY2yLe0eaPpn4BxEo+qeC0ntokASDuEI=' 
WHERE 
  key_id = '41733fca47dee59a734cb02527d4ed22db3edb621edd1184ae5c68557289b2ce' 
  AND (
    token = '6D48bNv0+jCjY2yLe0eaPpn4BxEo+qeC0ntokASDuEI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033