UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/G49ku2lz6RbcobcUQaKGqGBxMn80jpK2ySt81iyJ2g=' 
WHERE 
  key_id = '6937477abaa0bbe08701132d1ecc2f449c5d2f74ec2bbda5cfd791dbb0f7b20f' 
  AND (
    token = '/G49ku2lz6RbcobcUQaKGqGBxMn80jpK2ySt81iyJ2g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033