UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '43xZbWtKfgs9eC3JZgBRZB0pLOIFOQ+prsYLRoiUDp4=' 
WHERE 
  key_id = '1109b045cf3af021b2eba892f960a74a7b25bda1c5afc176f0ca26064324ba4f' 
  AND (
    token = '43xZbWtKfgs9eC3JZgBRZB0pLOIFOQ+prsYLRoiUDp4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033